/**
 * @description 页面路由
 * @author wangxin
 * @date 2020-6-1
 * @version 1.0
 */
import { Router, POWERS } from "_/schema";
import settings from "@/settings";

const PAGE_HOME = "home";

// 合并默认参数
settings.merge({
  route: {
    index: PAGE_HOME
  }
});
export default [
  new Router("global-home", 'global-home').path('/').redirect('/index')
    .append(
      new Router(PAGE_HOME, 'management-home', '首页').sort(0)
        .path('index')
        .component(() => import('../pages/folder/index.vue'))
    )
    .build(),

  new Router("project").path('/project')
    .append(
      new Router('project-create', '', '创建工程')
        .path('create')
        .component(() => import('../pages/project/index.vue'))
    )
    .build(),
  new Router("generator").path('/generator')
    .append(
      new Router('generator-config', '', '配置生成器')
        .path('config')
        .component(() => import('../pages/generator-config/index.vue'))
    )
    .build()
]
